package com.systemframework.util;

import cn.zhxu.bs.SearchResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public class SearchUtl {

    public static <T> Page<T> searchDataList(Integer pageNum, Integer pageSize, SearchResult<T> searchResult) {
        Page<T> page=new Page<>(pageNum,pageSize);
        page.setRecords(searchResult.getDataList());
        page.setTotal(searchResult.getTotalCount().longValue());
        return page;
    }

}
